﻿using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 从数据库中读取配置文件
{
    internal class FxConfigSources : IConfigurationSource
    {
        public string ConnStr { get; set; }
        public string TableName { get; set; }
        public FxConfigSources(string conn,string tableName)
        {
            this.ConnStr = conn;
            this.TableName = tableName;
        }
        public IConfigurationProvider Build(IConfigurationBuilder builder)
        {
            return new TxDBConfig(ConnStr, TableName);
        }
    }
}
